<template>
    <div>
        <div class="searchInput">
            <div class="kuang">
                <div>
                    账号： <el-input v-model="searchOrderNumber" placeholder="请输入账号"></el-input>&emsp;&emsp13;
                </div>
                <div>
                    状态：   <el-select style="width: 116px;" v-model="searchState" placeholder="请选择">
                                <el-option
                                v-for="item in stateOptions"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>
                </div>
                <div>
                        <span class="demonstration">&emsp;&emsp;&emsp;时间： </span>
                        <el-date-picker
                        v-model="searchDate"
                        type="daterange"
                        range-separator="至"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期">
                        </el-date-picker>
                </div>
        </div>
        <div class="btns">
            <el-button class="chaxun">查询</el-button>
            <el-button class="reset">重置</el-button>
        </div>
        </div>
        <div class="addBtn">
           
        </div>
        <!-- 数据 -->
        <el-table
            :header-cell-style="{background:'#e8efff',color:'#000000'}"
            :data="lockTableData"
            :loading="loading"
            style="width: 100%">
            <el-table-column
            type="selection"
            width="55">
            </el-table-column>
            <el-table-column prop="order" label="序号" width="60">
                <template v-slot="scope">
                    <div style="color:#949BBE;">
                        {{ scope.row.order }}
                    </div>
                </template>
            </el-table-column>
            <el-table-column prop="account" label="账号">
                <template v-slot="scope">
                    <div style="color:#949BBE;">
                        {{ scope.row.account }}
                    </div>
                </template>
            </el-table-column>
            <el-table-column prop="ip" label="IP地址">
                <template v-slot="scope">
                    <div style="color:#949BBE;">
                        {{ scope.row.ip }}
                    </div>
                </template>
            </el-table-column>
            <el-table-column prop="login" label="登录地点">
                <template v-slot="scope">
                    <div style="color:#949BBE;">
                        {{ scope.row.login }}
                    </div>
                </template>
            </el-table-column>
            <el-table-column prop="system" label="操作系统" width="150">
                <template v-slot="scope">
                    <div style="color:#949BBE;">
                        {{ scope.row.system }}
                    </div>
                </template>
            </el-table-column>
            <el-table-column prop="login_state" label="登录状态">
                <template v-slot="scope">
                    <div style="color:#949BBE;">
                      <span v-if="scope.row.login_state == 0">登录成功</span>
                      <span v-if="scope.row.login_state == 1">登录失败</span>
                    </div>
                </template>
            </el-table-column>
            <el-table-column prop="login_time" label="登录时间">
                <template v-slot="scope">
                    <div style="color:#949BBE;">
                        {{ scope.row.login_time }}
                    </div>
                </template>
            </el-table-column>
        </el-table>
        <Pagination />
        <!-- 添加/详情/编辑 -->
      
    </div>
</template>

<script>
import Pagination from '@/components/Pagination.vue'
    export default {
        components:{
            Pagination
        },
        data() {
            return {
                loading:true,
                disabled:false,
                searchOrderNumber:'',
                searchPhoneNumber:'',
                searchDate:'',
                searchState:null,
                stateOptions: [
                    {
                    value: null,
                    label: '请选择'
                    }, 
                    {
                    value: 0,
                    label: '登录成功'
                    }, 
                    {
                    value: 1,
                    label: '登录失败'
                    }, 
                ],
                lockTableData: [
                {
                    order: '1',
                    account: 'admin',
                    ip: '128.0.0.1',
                    login:'管理员',
                    system:'Windows 10',
                    login_state:0,
                    login_time:'2023.03.03 12:20:30',
                    id:1
                }
                ],
            }
        },
        methods: {
            
        },
        
    }
</script>

<style lang="less" scoped>
.searchInput{
    text-align: left;
    font-size: 14px;
    height: 25.98px;
    font-family: PingFang SC-Regular, PingFang SC;
    font-weight: 400;
    color: #666666 !important;
}
.el-input{
    width: 280px;
    height: 35.98px;
    font-size: 11.97px;
    color: #666666;
    background: #F0F1F6;
}
.el-input__inner{
  background-color: #F0F1F6;  
}
.el-select{
    width: 280px;
    height: 35.98px;
}
.kuang{
    float: left;
}
.btns{
    float: right;
}
.el-button{
    background: transparent;
    border: none;
}
.chaxun{
    background: #165BFF;
    color: white;
}
.reset{
    background: #F0F1F6;
    color: #666666;
}
.addBtn{
    text-align: left;
    margin-top: 32px;
}
.newAdd{
    background: #165BFF;
    color: white;
    width: 92px;
    height: 36px;
}
::v-deep .el-table th > .cell {
  text-align: center;
}

::v-deep .el-table .cell {
  text-align: center;
}
.editBtn{
    display: inline-block;
    margin-right: 8px;
    color: #09D796;
    cursor: pointer;
}
.detailBtn{
    margin-right: 8px;
    display: inline-block;
    color: #165BFF;
    cursor: pointer;
}
.deleteBtn{
    display: inline-block;
    color: #FA698D;
    cursor: pointer;
}
.confirmButtonClass{
    background: #165bff;
}
#dialog .el-dialog__header {
    padding: 20px 20px 0px;
    background: #165BFF;
    text-align: left;
    font-weight: bold;
}
#dialog .el-dialog__body{
    height: 188px;
}
.formCancel,.formConfirm{
    width: 140px;
    height: 44px;
    border-radius: 4px 4px 4px 4px;
    border: none;
    opacity: 1;
}
.formCancel{
    background: white;
    border: 1px solid #F0F1F6;
}
.formConfirm{
    margin-left: 24px;
    background: #165BFF;
}
.dialog-footer{
    margin-top: -32px;
    text-align: center;
}
.el-dialog .el-input{
    width: 423px;
}
.el-dialog .el-select{
    width: 423px;
}
.dialog_title{
    margin-top: 24px;
    font-size: 16px;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
    color: #000000;
}
.kuang>div{
    margin: 5px auto;
    display: inline-block;
}
.el-table{
    margin-top: 52px;
}

</style>
<style>
.el-message-box__header{
    font-size: 16px;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
    color: #000000;
    line-height: 16px;
}
.el-message-box{
    width: 360px !important;
    height: 188px !important;
    background:#FFFFFF;
    border-radius: 4px 4px 4px 4px;
    opacity: 1;
}
.el-message-box--center .el-message-box__content{
    margin-top: 10px;
}
.el-message-box__message{
    font-size: 16px;
    font-family: PingFang SC-Regular, PingFang SC;
    font-weight: 400;
    color: #666666;
}
.el-message-box__btns{
    margin-top:38px ;
}
.el-button--default{
    width: 80px;
    height: 36px;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
}
.el-button--primary{
    width: 80px;
    height: 36px;
    background:#165BFF !important;
    border-radius: 4px 4px 4px 4px;
    border: 1px solid #165BFF;
    opacity: 1;
}

</style>